{% for each_comment in current_page %}
<div> {{ each_comment.text }} </div>
{% endfor %}

<a href="{% url 'blog:index' %}"> home page </a>&nbsp
{% if current_page.has_previous %}
<a href="?page={{ current_page.previous_page_number }}"> last page </a>&nbsp
{% endif %}
<span> {{ current_page.number }} </span>
{% if current_page.has_next %}
<a href="?page={{current_page.next_page_number }}"> next page </a>&nbsp
{% endif %}
<a href="?page={{ current_page.paginator.num_pages }}"> end page </a>&nbsp


<form method="POST" action="{% url 'blog:addcomment' %}" >
{% csrf_token %}
<h4> text </h4>
<input type="text" name="comment">
<input type="submit"/>
</form>
